package fr.pp.tcxhandler.mapper;

import com.sun.xml.bind.marshaller.NamespacePrefixMapper;

/**
 * 
 * @author Parant
 * 
 */
public class TcxNamespacePrefixMapper extends NamespacePrefixMapper {

	private static final String EMPTY_STRING = "";
	public static String URI_TCX = "http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2";
	public static String ACTIVITY_EXT = "http://www.garmin.com/xmlschemas/ActivityExtension/v2";

	public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
		if (URI_TCX.equals(namespaceUri)) {
			return EMPTY_STRING;
		}
		return suggestion;
	}
}
